<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>商品管理</title>
    <link rel="shortcut icon" type="image/x-icon" th:href= "@{/static/img/timg.jpg}">
    <link rel="stylesheet" href="../../static/css/backstage_index.css">
    <link rel="stylesheet" href="../../static/css/backstage_user.css">
    <link rel="stylesheet" href="../../static/css/bootstrap.min.css">
    <link rel="stylesheet" href="../../static/css/merchandise.css">
</head>
<body>
<div th:include="/like/business_content::seam">
</div>
    <!--    主页面-->
<div class="home_page">
    <div id="container_user">
        <div class="tab_manager_title">
            <!--                用户-->
            <div class="merchandise">
<!--               顶部搜索-->
                <form action="/administrator/selectGoodsLikeDate" method="get">
                    <div class="me_search">
                        <input name="date" type="text" class="me_input" placeholder="请输入查找信息" th:value="${selectGoods}">
                    </div>
                    <div class="btn_search">
                        <input type="submit" value="搜索">
                    </div>
                </form>

                <div style="clear: both"></div>
                <!--            模态框-->
                <!-- 按钮触发模态框 -->
                <div class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal" id="add">
                    添加信息
                </div>
                <!-- 模态框（Modal） -->
                <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                    <div class="modal-dialog">
                        <div class="modal-content">
                            <div class="modal-header">
                                <button type="button" class="close" data-dismiss="modal"
                                        aria-hidden="true">×
                                </button>
                            </div>
                            <div class="modal-body">
                                <!-- 添加用户信息表格-->
                                <div class="number">
                                    <p>商品名称</p>
                                    <input type="text" class="ger" id="goods_name">
                                    <span></span>
                                </div>
                                <div class="number">
                                    <p>参考价格</p>
                                    <input type="text" class="ger" id="goods_price">
                                    <span></span>
                                </div>
                                <div class="number">
                                    <p>所属店铺ID</p>
                                    <input type="text" class="ger" id="goods_id">
                                    <span></span>
                                </div>
                                <div class="number">
                                    <p>图片</p>
                                    <input style="padding: 0;" type="file" class="ger" id="goods_photo">

                                    <span></span>
                                </div>
                            </div>
                            <div class="modal-footer">
                                <button type="button" class="btn btn-default"
                                        data-dismiss="modal">关闭
                                </button>
                                <button type="button" class="btn btn-primary" id="submit">
                                    提交
                                </button>
                            </div>
                        </div><!-- /.modal-content -->
                    </div><!-- /.modal-dialog -->
                </div><!-- /.modal -->
                <!--编辑模态框-->
                <div class="shadow">
                    <div class="compile">
                        <div class="style_img">
                            <img src="../../static/img/Error-Cloud.png">
                        </div>
                        <div style="clear: both"></div>
                        <div class="style_list">
                            <p>商品名称</p>
                            <input type="text" id="conName">
                        </div>
                        <div class="style_list">
                            <p>参考价格</p>
                            <input type="text" id="comPrice">
                        </div>
                        <div class="style_btn">
                            <div class="style_submit">提交</div>
                            <div class="style_close">关闭</div>
                        </div>
                    </div>
                </div>
<!--                商品表格-->
                <div class="container" style="margin-top: 25px;">
                    <table class="table table-striped table-bordered table-hover table-condensed">
                        <thead>
                        <tr>
                            <th>ID</th>
                            <th>商品名称</th>
                            <th>商品参考价格</th>
                            <th>所属店铺ID</th>
                            <th>交易次数</th>
                            <th>编辑列</th>
                            <th>删除列</th>
                        </tr>
                        </thead>
                        <tbody th:if="${goods.getList()!=null}">
                        <tr th:each="goodsDate:${goods.getList()}">
                            <td th:text="${goodsDate.id}"></td>
                            <td th:text="${goodsDate.goodsName}"></td>
                            <td th:text="${goodsDate.goodsPrice}"></td>
                            <td th:text="${goodsDate.storeId}"></td>
                            <td th:text="${goodsDate.buyNumber}"></td>
                            <td class="com-edit style_replace" th:data-id="${goodsDate.id}">编辑</td>
                            <td class="con-delete">
                                <a href="JavaScript:;" class="delete" th:data-id="${goodsDate.id}">删除</a>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
    <div class="page">
    <ul>
        <li th:if="${selectGoods!=null&&goods.getNavigatepageNums().length!=1}" th:each="datePage:${goods.getNavigatepageNums()}" ><a th:href="@{'http://localhost:8080/administrator/selectGoodsLikeDate?page='+${datePage}+'&date='+${selectGoods}}" th:text="${datePage}"></a></li>
        <li th:if="${selectGoods==null&&goods.getNavigatepageNums().length!=1}" th:each="datePage:${goods.getNavigatepageNums()}" ><a th:href="@{'http://localhost:8080/administrator/backstageCommodityJump?page='+${datePage}}" th:text="${datePage}"></a></li>
    </ul>
    </div>
</div>
</body>
<!--jQ-->
<script src="../../static/js/jquery-3.3.1.min.js"></script>
<script src="../../static/js/backstage_commodity.js"></script>
<script src="../../static/js/bootstrap.min.js"></script>
</html>